package io.gitee.zhangbinhub.admin.po

import io.swagger.v3.oas.annotations.media.Schema

import jakarta.validation.constraints.NotBlank

/**
 * @author zhang by 17/01/2019
 * @since JDK 11
 */
@Schema(description = "机构配置参数")
data class OrganizationPo(

    @Schema(description = "机构ID，更新时必填")
    var id: String? = null,

    @Schema(description = "机构名称", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "机构名称不能为空")
    var name: String? = null,

    @Schema(description = "机构区域", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "机构区域不能为空")
    var area: String? = null,

    @Schema(description = "机构编码", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "机构编码不能为空")
    var code: String? = null,

    @Schema(description = "上级机构ID", requiredMode = Schema.RequiredMode.REQUIRED)
    @get:NotBlank(message = "上级机构ID不能为空")
    var parentId: String? = null,

    @Schema(description = "序号", requiredMode = Schema.RequiredMode.REQUIRED)
    var sort: Int = 0,

    @Schema(description = "关联用户ID")
    var userIds: MutableList<String> = mutableListOf()

)
